home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 31
/
Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso
/
Aminet
/
dev
/
c
/
vbccm68k.lha
/
vbcc
/
vbccm68k.readme
Wrap
Text File
|
1999-03-07
|
16KB
|
553 lines
Short: free optimizing ANSI C compiler (68k)
Uploader: volker@vb.franken.de (Volker Barthelmann)
Author: volker@vb.franken.de (Volker Barthelmann)
Type: dev/c
Version: 0.7
Replaces: dev/c/vbcc.lha
vbcc - portable ANSI C compiler (c) in 1995-99 by Volker Barthelmann
INTRODUCTION
vbcc is a free portable and retargetable ANSI C compiler.
This archive contains the compiler, preprocessor, assembler, linker,
frontend, message browser, startup codes, C-libraries, amiga.lib
replacements as well as several other tools for 68k.
This gives you a complete system that allows to develop programs in
ANSI C as well as Amiga-specific programs (provided you obtain the
OS-includes) running on 68k.
All major parts of this distribution (including compiler, preprocessor,
libraries etc.) have been compiled/assembled with this system and
apart from the OS-includes everything needed to rebuilt vbcc,
the libraries and many of the other programs is contained in this
archive and the corresponding source archive.
Note that the programs in this archive all run on the 68k. There is
another archive which contains compilers that run on the PPC.
FEATURES
vbcc..
- comes with source
- is free
- is portable and retargetable
- comes with a global optimizer that can e.g. do global common
subexpression elimination, constant propagation, function inlining
and several other optimizations (but is not yet finished and may
have some bugs)
- should be ANSI compliant
- can generate code that runs on a plain 68000 CPU
- can generate code optimized for 020/030, 040 or 060
- can generate code that uses the 68881/2, 68040/060 FPUs directly
and comes with appropriate math-libraries
- can generate code that runs on PowerUp-boards
- generates standard Amiga-68k-objects, PPC-ELF-objects or
WarpOS-EHF-objects
- does not need too much memory
- comes with a message browser
- comes with a config program
- offers a lot of error/warning messages that can be turned on/off
separately
WHAT'S NEW
Some changes since the last release:
- bug fixes
- new optimizations
- much improved libaries
- use of Frank Wille's linker vlink
- support for PPC/WarpOS
- support for small data for PPC/ELF and PPC/WarpOS
- support for __saveds (68k, PPC/ELF and PPC/WarpOS)
- support for __far (68k, PPC/EFL and PPC/WarpOS)
- support for __chip (68k and PPC/WarpOS)
- support for auto opening of libraries (68k, PPC/ELF and PPC/WarpOS)
- cleaned up distributions for all three Amiga targets
- checking for unresolved symbols for PPC/ELF
- scheduler for PPC (ELF and WarpOS)
REQUIREMENTS
To use vbcc you need:
- an Amiga with OS 2.0 or higher
- enough RAM (it is possible to translate small programs with 1MB, but
for larger programs much more will be needed)
Stuff that is not needed, but may be very useful:
- harddisk
- editor
- make, touch etc.
- the Amiga OS-includes (they can be found on certain CDs)
- pipe-command (to use the message browser)
Also you should know how to use the shell and you should know ANSI C
(if you need a book I recommend (like everyone) "The C Programming
Language, Second Edition, ANSI C" by Kernighan and Ritchie).
LEGAL
Note that this distribution contains several programs, libraries etc.
that are from different authors and are under different legal status.
So always read the corresponding doc/guide-file to find out under
what conditions a certain file may be used, distributed etc.
For the most part you can assume that you may use everything for
non-commercial purposes and may distribute the unchanged archive
in whole.
Changing any parts from this archive, distributing parts of it or
using it commercially might be legal for certain parts, but illegal
for others, so read all docs carefully before doing any of the above.
This archive contains code written by (this list may be incomplete):
Volker Barthelmann, Frank Wille, Thorsten Schaaps, Dennis Ritchie,
Matthias Fleischer, Gunther Nikl, Mike Schwartz, Kasper Graversen,
Johnny Tevessen
However, if you have any comments/problems etc. with anything, please
do not bother them, but write to me (volker@vb.franken.de) first.
Exceptions are the parts by Kasper Graversen.
INSTALLATION/TUTORIAL
[Names of directories, binaries or assigns have changed since earlier
versions as have config-files. So users of earlier versions should
read this again and do a complete re-install to avoid problems.]
The first step (which you probably already did) is to extract the
entire archive (take care to preserve the file attributes). If you
have several archives of the vbcc distribution you can just extract
them all to the same place.
The distributed programs are for the most part only usable from a shell.
To use vbcc the following steps are necessary:
1. Go to the subdirectory vbcc/machines/amiga.
2. If you have the Amiga OS-includes copy them into the include
directory.
3. Execute the script init_vbcc.
4. If you compile larger projects it may be necessary to increase
the stack further.
If you use vbcc frequently it is probably a good idea to add those
commands to your user-startup, shell-startup or similar.
Now you should be able to use vbcc. E.g. if you want to compile and
link the program hello.c you can type
vc hello.c
This will compile and link the file hello.c and create the executable
a.out in the current directory.
vc hello.c -o hello
will do the same, but the created executable will be called hello.
vc -c t1.c t2.c
will compile t1.c and t2.c without linking, creating the object files
t1.o and t2.o.
vc t1.o t2.o -o tt
will link them together and create the executable tt.
If your program uses floating point add -lmieee to the commandline
to link with the math-library, e.g.:
vc calc.c -o calc -lmieee
There is also an extra.lib which includes a few functions that are
no standard ANSI functions but some people seem to regard them as
standard functions. If you use one of these add -lextra to the
commandline and read:
vbcc/machines/amiga/doc/extralibm68k.doc
For further information read the files:
vbcc/doc/vbcc.doc
vbcc/doc/vc.doc
vbcc/doc/vbccm68k.doc
vbcc/machines/amiga/doc/vclibm68k.doc
SUPPORT FOR OTHER TARGETS
This release of vbcc is able to generate code for 68k, PPC/ELF
and PPC/WarpOS. If you have installed other backends you can
choose the target by specifying another config file with the
'+'-option (e.g. +ppc).
For further details see the corresponding docs for this target.
CONFIGURATION
The frontend searches for a file vc.config in ENV: and vbcc: to read
preferences. The provided sample vc.config should be usable and does
not have to be changed but you can add something to suit your personal
preferences - read
vbcc/doc/vc.doc
to find out more.
MESSAGE BROWSER
If you start the message browser with
run vbrowse
it will open a window with a listview gadget. If you have a pipe
command installed you can now invoke vc via tovbr, e.g.
tovbr vc hello.c
and any output from vc will be displayed in the window of vbrowse
rather than in the shell. It might be convenient to make an alias like
alias vb tovbr vc
so that invoking vb will automatically display the output in the browser.
If there is an error/warning-message in the browser you can invoke a
configurable command by double-clicking on the message.
Double-clicking on the quoted line will invoke GoldEd (if you have it
installed) by default, load the file that caused the error and the cursor
will be placed on this line in the default configuration. If you use
anot